home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v9n18.arc
/
METARECT.C
< prev
next >
Wrap
Text File
|
1990-10-04
|
897b
|
29 lines
/*----------------------------------------------------------
METARECT.C -- A function to obtain a metafile image size
(c) Ziff Communications Co, 1990
PC Magazine * Charles Petzold, 7/90
----------------------------------------------------------*/
VOID QueryMetaFileBoundaryRect (HAB hab, HMF hmf, RECTL *prcl)
{
HPS hps ;
SIZEL sizlPage ;
sizlPage.cx = 100 ;
sizlPage.cy = 100 ;
hps = GpiCreatePS (hab, NULL, &sizlPage, PU_ARBITRARY) ;
GpiSetDrawControl (hps, DCTL_DISPLAY, DCTL_OFF) ;
GpiSetDrawControl (hps, DCTL_BOUNDARY, DCTL_ON) ;
GpiPlayMetaFile (hps, hmf, 0L, NULL, NULL, 0L, NULL) ;
GpiSetDrawControl (hps, DCTL_DISPLAY, DCTL_ON) ;
GpiSetDrawControl (hps, DCTL_BOUNDARY, DCTL_OFF) ;
GpiQueryBoundaryData (hps, prcl) ;
GpiDestroyPS (hps) ;
}